#ifndef __OCC_VALUE_CPU_H__
#define __OCC_VALUE_CPU_H__

#include "mian_util.h"

void initShiftTable() ;

void initCountValue(BWT* bwt) ;


char host_getCharFromQueries(unsigned int * Queries, unsigned int queryId, unsigned int pos);

unsigned int host_GPUDNAOccCount(unsigned int *dna, unsigned int index, 
			char character, unsigned int backward) ;
			
void host_GPUDNAAllOccCount(unsigned int *dna, unsigned int index, 
					unsigned int backward, unsigned int occCount[]);

unsigned int host_GPUBWTOccValue(unsigned int *bwt, unsigned int *occ, 
			unsigned int index, char c, unsigned int inverseSa0);
			
void host_GPUBWTAllOccValue(unsigned int *bwt, unsigned int *occ, 
				unsigned int index, unsigned int inverseSa0, unsigned int occCount[]);
				
bool host_bwtCalc(BWT *bwt, char baseId, unsigned int * start, unsigned int * end);

bool host_bwtCalcWithOccValue(unsigned int *countValue,char baseId, unsigned int startOccValue,
					unsigned int endOccValue, unsigned int * start, unsigned int * end);

void host_BWTAllOccValue_2Layer(unsigned int *bwt, unsigned int *occMajor, unsigned int *occMinor,
                                unsigned int index, unsigned int inverseSa0, unsigned int occCount[]);
					
void resetCount();
uint64 getCount();
					
#endif /*__OCC_VALUE_H__*/
